<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head th:replace="dashboard/header :: header"></head>
<body>

<!--
@desc  更新
@author WeiXiaoJin
@since 2020-01-30 07:28:26
-->

	<div layout:fragment="content">
		<div class="container-fluid content-main">
			<div class="animated fadeIn">
				<div class="row">
					<div class="col-sm-12">
						<div class="card">
							<div class="card-body">

								<form class="form-horizontal" id="modifyForm">

									<input type="hidden" name="id" th:value="${bean.id}" />
									
<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">应用标识key </label>
	<div class="col-md-9">
				<input class="form-control" id="appKey" type="text" th:value="${ bean.appKey}" name="appKey" placeholder="应用标识key">
			</div>
</div>
												<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">加密算法secret </label>
	<div class="col-md-9">
				<input class="form-control" id="appSecret" type="text" th:value="${ bean.appSecret}" name="appSecret" placeholder="加密算法secret">
			</div>
</div>
												<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">是否删除 </label>
	<div class="col-md-9">
				<input class="form-control" id="enabled" type="text" th:value="${ bean.enabled}" name="enabled" placeholder="是否删除">
			</div>
</div>
												<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">创建时间 </label>
	<div class="col-md-9">
				<div class="input-group date">
			<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
			<input type="text" class="form-control time-input" 
			       id="dateCreated-3" name="dateCreated" 
				   th:value="${ #dates.format(bean.dateCreated, 'yyyy-MM-dd HH:mm:ss')}" 
			       data-type="datetime" 
			       data-format="yyyy-MM-dd HH:mm:ss" 
			       placeholder="yyyy-MM-dd HH:mm:ss" lay-key="dateCreated-3">
		</div>
			</div>
</div>
												<div class="form-group row">
	<label class="col-md-2 col-form-label control-label" for="text-input">更新时间 </label>
	<div class="col-md-9">
				<div class="input-group date">
			<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
			<input type="text" class="form-control time-input" 
			       id="dateUpdated-3" name="dateUpdated" 
				   th:value="${ #dates.format(bean.dateUpdated, 'yyyy-MM-dd HH:mm:ss')}" 
			       data-type="datetime" 
			       data-format="yyyy-MM-dd HH:mm:ss" 
			       placeholder="yyyy-MM-dd HH:mm:ss" lay-key="dateUpdated-3">
		</div>
			</div>
</div>
																				</form>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<footer th:replace="dashboard/footer :: footer"></footer>

	<script type="text/javascript">
		var modifyForm = $("#modifyForm") ; 
		$(function(){
			addForm.validate({
				ignore: [],  
				rules: {
appKey: {required:true}
,appSecret: {required:true}
,enabled: {required:true}
,dateCreated: {required:true}
,dateUpdated: {required:true}
				}
			});
		}) ;

		function submitHandler() {
			var result = $.validate.form("modifyForm");
			if(result){	
				var modifyUrl = ctx+"gateway/admin/gateAppAuth/update" ;
				$.operate.save(modifyUrl , modifyForm.serialize());
			}
	    }
	</script>
</body>
</html>
